﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace WebApplication1
{
    public partial class ShowImage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["id"] == null)
                return;
            int i = Convert.ToInt32(Request.QueryString["id"]);
            byte[] m_image = SQLHelper.getBookImageById(i);
            if (m_image.Length > 0)
            {
                Response.Clear();
                Response.OutputStream.Write(m_image, 0, m_image.Length);
                Response.End();
            }
        }
    }
}